﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SuperX.Common
{
    public enum AccessMode
    {
        CurrentFirst,
        Default,
        Current
    }

    public enum ControllerStatus
    {
        None,
        Initing,
        Starting,
        Running,
        Stopping,
        Reseting
    }

    [Serializable]
    public enum MethodType
    {
        IO = 1,
        Tag,
        Alarm = 4,
    }

    public enum QUALITIES : short
    {
        // Fields
        NG = 0,

        OK = 1,

        /// <summary>
        /// 配置错误
        /// </summary>
        ERR = 4,

        /// <summary>
        /// 设备异常
        /// </summary>
        FAIL = 12,

        /// <summary>
        /// 通讯异常
        /// </summary>
        COMMFAIL = 0x18,

        EGUEXCEEDED = 0x54,

        /// <summary>
        /// 未知
        /// </summary>
        UNKNOW = 24,

        LASTKNOWN = 20,
        LASTUSABLE = 0x44,
        LOCALOVERRIDE = 0xd8,
        MASK = 0xc0,
        NOTCONNECTED = 8,
        OUTOFSERVICE = 0x1c,
        SENSORCAL = 80,
        SENSORFAIL = 0x10,
        SUBNORMAL = 0x58,
        UNCERTAIN = 0x40,
        STATUSMASK = 0xfc,
    }

    /// <summary>
    /// 数据库枚举类型
    /// </summary>
    public enum DatabaseProvider
    {
        Sqlite = 0,
        MySql = 1,
        SqlServer = 2,
        Oracle = 3,
        InfluxDB = 4,
        QuestDB = 5
    }
}